package com.weiqiao.mall.service.impl;

import com.google.gson.Gson;
import com.weiqiao.mall.domain.MemberShipEntity;
import com.weiqiao.mall.repository.IMemberShipRepository;
import com.weiqiao.mall.service.IMemberShipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author ChenYF
 * @Description
 * @Date 2020/7/24 17:26
 */
@Service("memberShipService")
public class MemberShipServiceImpl implements IMemberShipService {

    @Autowired
    private IMemberShipRepository memberShipRepository;

    @Override
    public boolean addMember(int company_id, MemberShipEntity entity) {
        return memberShipRepository.addMember(company_id, new Gson().toJson(entity));
    }
}
